package com.ilink.ilinkcommon.domain.PO.studyservice;

/**
 * <h3>new-ilink-java-backend-psy</h3>
 *
 * @Description <p>实体类，用于记录用户的学习情况</p>
 * @Author pengshiyao
 * @Date 2024-10-01 00:29
 **/

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * @ClassName UserCourseStudyRecord
 * @Description 记录用户学习课程资源的情况
 * @Author pengshiyao
 * @Date 2024-10-01 00:29
 **/
@Data
@TableName("user_course_study_record")
public class UserCourseStudyRecord implements Serializable {

    private static final long serialVersionUID = 1L;

    private String userId;  // 用户ID，关联 tb_user 表的 User_id

    private Long coursesourceId;  // 课程资源ID，关联 coursesource 表的 coursesource_id

    private Integer studyDuration = (Integer) 0;  // 学习时长，单位为秒，默认值为0

    private Integer studyCount = (Integer) 0;  // 学习次数，默认值为0

    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date lastAccess;  // 最近访问时间，自动更新

    @TableField("user_study_status")
    private Integer userStudyStatus;    //用户该课程的学习完成状态
}
